import React from 'react'
import {Card,Empty} from 'antd'
import {GridContent} from '@ant-design/pro-layout';
import styles from '../style.less';
import {getSuffix} from '@/utils/utils';
import MyIcon from "@/components/Icons/MyIcon";

const Annex = ({info}) => {

  return (
    <>
      <GridContent>
        <Card title="附件" style={{marginBottom: 24}} bordered={false}>
          <p>身份证信息</p>
          {
            info.idcardImgs ? info.idcardImgs?.map((item, index) => {
              return <div className={styles.annexIdCardDiv} key={index}>
                <MyIcon type={getSuffix(item)}/>
                <a className={styles.annexTxtSpan} href={item}>{item}</a>
              </div>
            }):<Empty className={styles.annexEmpty} image={Empty.PRESENTED_IMAGE_SIMPLE}/>
          }
          <p>薪酬/收入信息</p>
          {
            info.oldSalaryRecordUrl ? info.oldSalaryRecordUrl?.map((item, index) => {
              return <div className={styles.annexIdCardDiv} key={index}>
                <MyIcon type={getSuffix(item)}/>
                <a className={styles.annexTxtSpan} href={item}>{item}</a>
              </div>
            }):<Empty className={styles.annexEmpty} image={Empty.PRESENTED_IMAGE_SIMPLE}/>
          }
          <p>离职证明</p>
          {
            info.dimissionUrl ? <div className={styles.annexIdCardDiv}>
                <MyIcon type={getSuffix(info.dimissionUrl)}/>
                <a className={styles.annexTxtSpan} href={info.dimissionUrl}>{info.dimissionUrl}</a>
              </div>
            :<Empty className={styles.annexEmpty} image={Empty.PRESENTED_IMAGE_SIMPLE}/>
          }
          <p>毕业证信息</p>
          {
            info.graduationUrl ? <div className={styles.annexIdCardDiv}>
                <MyIcon type={getSuffix(info.graduationUrl)}/>
                <a className={styles.annexTxtSpan} href={info.graduationUrl}>{info.graduationUrl}</a>
              </div>
              :<Empty className={styles.annexEmpty} image={Empty.PRESENTED_IMAGE_SIMPLE}/>
          }
          <p>学位证信息</p>
          {
            info.degreeUrl ? <div className={styles.annexIdCardDiv}>
                <MyIcon type={getSuffix(info.degreeUrl)}/>
                <a className={styles.annexTxtSpan} href={info.degreeUrl}>{info.degreeUrl}</a>
              </div>
              :<Empty className={styles.annexEmpty} image={Empty.PRESENTED_IMAGE_SIMPLE}/>
          }
        </Card>
      </GridContent>
    </>
  );
};
export default Annex;
